package com.wteam.PoJo.VO;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 评论表
 * </p>
 *
 * @author author
 * @since 2024-07-17
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("tb_comment")
@ApiModel(value="Comment对象", description="评论表")
public class CommentVO implements Serializable {

    @ApiModelProperty(value = "评论者id")
    private Long userId;

    @ApiModelProperty(value = "评论表的主键id（查看回复接口要传）")
    private Long id;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT,select = false)
    @ApiModelProperty(value = "发布时间")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "内容")
    private String content;

    @ApiModelProperty(value = "点赞量")
    private Integer likes;

    @ApiModelProperty(value = "回复量")
    private Integer replies;

    @ApiModelProperty(value = "评论者的用户名")
    private String username;

    @ApiModelProperty(value = "评论者的头像")
    private String avatar;

    @ApiModelProperty(value = "点赞标志（true为有点赞，false相反）")
    private Boolean mylike=false;

}
